home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / hard / galer / source / src.lha / Source / GALerTest / GALerTest.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-30  |  16.8 KB  |  777 lines

  1. /****************************************************************/
  2. /*                                */
  3. /* GALerTest - testprogram for the hardware            */
  4. /*                                */
  5. /* Soft- and Hardware  copyright (c)1991-1993            */
  6. /*     by Christian Habermann                    */
  7. /*        Asamstr. 17                        */
  8. /*        85356 Freising                    */
  9. /*        Germany                        */
  10. /*                                */
  11. /* used Compiler: SAS-C 6.3                    */
  12. /*                                */
  13. /****************************************************************/
  14.  
  15.  
  16.  
  17.  
  18. #define     STRINGARRAY    1
  19.  
  20.  
  21. #include <exec/memory.h>
  22. #include <exec/ports.h>
  23. #include <exec/types.h>
  24. #include <intuition/intuition.h>
  25. #include <libraries/locale.h>
  26. #include <libraries/reqtools.h>
  27. #include <stdlib.h>
  28. #include <stdio.h>
  29. #include <string.h>
  30.  
  31. #include <proto/locale.h>
  32. #include <proto/reqtools.h>
  33. #include <proto/graphics.h>
  34. #include <proto/intuition.h>
  35. #include <proto/exec.h>
  36.  
  37. #include "GALer.h"
  38. #include "LocGT.h"
  39.  
  40.  
  41.  
  42. #ifdef LATTICE
  43. int CXBRK(void)    { return(0); }  /* Disable Lattice CTRL/C handling */
  44. int chkabort(void) { return(0); }  /* really */
  45. #endif
  46.  
  47.  
  48.  
  49. #define     YPOS        30
  50. #define  WIN_WIDTH    640
  51. #define  WIN_HEIGHT    200
  52.  
  53.  
  54.  
  55. void Clear(void);
  56.  
  57. void Print(UBYTE *text);
  58.  
  59. void WaitForAction(void);
  60.  
  61. void closestuff(void);
  62.  
  63. void openstuff(void);
  64.  
  65. void FreeTimer(void);
  66.  
  67. void LocalizeText(void);
  68.  
  69. int  GetTimer(void);
  70.  
  71.  
  72.  
  73. extern    int    hw_version;
  74.  
  75.  
  76. struct    MsgPort        *timeport;
  77. struct    timerequest    *timereq;
  78. struct    LocaleBase    *LocaleBase = 0;
  79. struct    ReqToolsBase    *ReqToolsBase = 0;
  80. struct    IntuitionBase    *IntuitionBase = 0;
  81. struct    GfxBase        *GfxBase = 0;
  82. struct    IntuiMessage    *message;
  83. struct    Window        *window = 0;
  84. struct    RastPort    *rp;
  85. struct    TextFont    *txtfont;
  86. struct    TextAttr    txtattr;
  87. struct    Catalog        *catalog = 0;
  88.  
  89.  
  90.  
  91. SHORT BorderVectors1a[] = { 0,15,81,15,81,0 };
  92. SHORT BorderVectors1b[] = { 0,15,0,0,81,0 };
  93.  
  94. struct Border Border1b    = { -1,-1,2,0,JAM1,3,BorderVectors1b,NULL };
  95. struct Border Border1a    = { -1,-1,1,0,JAM1,3,BorderVectors1a,&Border1b };
  96.  
  97.  
  98.  
  99. struct IntuiText GadIText3 = { 1, 0, JAM2, 4, 4, &txtattr, NULL, NULL };
  100.  
  101. struct IntuiText GadIText2 = { 1, 0, JAM2, 4, 4, &txtattr, NULL, NULL };
  102.  
  103. struct IntuiText GadIText1 = { 1, 0, JAM2, 8, 4, &txtattr, NULL, NULL };
  104.  
  105.  
  106.  
  107. struct Gadget CancelGad = { NULL, 522, 180, 80, 14,
  108.                 NULL,
  109.                 RELVERIFY,
  110.                 BOOLGADGET+REQGADGET,
  111.                 (APTR)&Border1a,NULL,
  112.                 &GadIText2,NULL,NULL,1,NULL };
  113.  
  114. struct Gadget ContGad   = { &CancelGad, 40, 180, 80, 14,
  115.                 NULL,
  116.                 RELVERIFY,
  117.                 BOOLGADGET+REQGADGET,
  118.                 (APTR)&Border1a,NULL,
  119.                 &GadIText1,NULL,NULL,0,NULL };
  120.  
  121.  
  122.  
  123.  
  124. struct NewWindow MyWin =  { 0, 0, WIN_WIDTH, WIN_HEIGHT,
  125.                 0, 1,
  126.                 CLOSEWINDOW|GADGETUP,
  127.                 ACTIVATE|WINDOWCLOSE|WINDOWDRAG|WINDOWDEPTH,
  128.                 &ContGad, NULL,
  129.                 (UBYTE *)"GALerTest V1.5  (c) 1991-1993 by Christian Habermann",
  130.                 NULL, NULL,
  131.                 0, 0, 0, 0,
  132.                 WBENCHSCREEN
  133.               };
  134.  
  135.  
  136.  
  137. int    prog_volt = 0;            /* Dummy for port.o module */
  138.  
  139. int    GALType, outIC1, outIC3, outIC4, outIC5;
  140.  
  141. int    ytxt = YPOS;
  142.  
  143.  
  144.  
  145.  
  146.  
  147. void main(void)
  148. {
  149.  
  150. int errorIC6a, errorIC6c, errorIC7;
  151.  
  152.  
  153.   openstuff();
  154.  
  155.  
  156.   if (GetTimer()) {                /* get timer*/
  157.     puts(AppStrings[MSG_ERR_TIMER].as_Str);
  158.     closestuff();
  159.     exit(FALSE);    
  160.    }
  161.  
  162.  
  163.   rp = window -> RPort;
  164.  
  165.   SetAPen(rp, 1L);
  166.   SetFont(rp, txtfont);                /* get font */
  167.  
  168.  
  169.   Print(AppStrings[MSG_INTRO_TXT].as_Str);
  170.   WaitForAction();
  171.  
  172.  
  173.   OffGadget(&ContGad,   window, NULL);        /* disable gadgets */
  174.   OffGadget(&CancelGad, window, NULL);
  175.                         /* get version of hardware */
  176.  
  177.   switch (rtEZRequestTags(AppStrings[MSG_HARDWARE_TXT].as_Str,
  178.            "V1.0, V1.1 | V1.2 | V1.3", NULL, NULL, RT_ReqPos,
  179.            REQPOS_CENTERSCR, TAG_END)) {
  180.     case 1:
  181.       hw_version = HW_GALER_1_0;
  182.       break;
  183.  
  184.     case 2:
  185.       hw_version = HW_GALER_1_2;
  186.       break;
  187.  
  188.     case 0:
  189.       hw_version = HW_GALER_1_3;
  190.       break;
  191.  
  192.     default:
  193.       closestuff();
  194.       exit(FALSE);
  195.   }
  196.  
  197.  
  198.   OnGadget(&ContGad,   window, NULL);        /* enable gadgets */
  199.   OnGadget(&CancelGad, window, NULL);
  200.  
  201.   SetAPen(rp, 0L);
  202.   RectFill(rp, 30L, 180L, 620L, 195L);
  203.   SetAPen(rp, 1L);
  204.  
  205.   RefreshGadgets(&ContGad, window, NULL);
  206.  
  207.  
  208.  
  209.   InitParPort();                /* set CIAs */
  210.  
  211.   InitGALer();                    /* initialize GALer */
  212.  
  213.  
  214.   Clear();
  215.   Print(AppStrings[MSG_TEST1_TXT].as_Str);
  216.   EnableOutput();
  217.   WriteByte(0x00, IC3);
  218.   WriteByte(0x00, IC4);
  219.   WriteByte(0x00, IC5);
  220.   WaitForAction();
  221.  
  222.  
  223.   Clear();
  224.   Print(AppStrings[MSG_TEST2_TXT].as_Str);
  225.   LED(ON);
  226.   WaitForAction();
  227.  
  228.  
  229.   Clear();
  230.   Print(AppStrings[MSG_TEST3_TXT].as_Str);
  231.   LED(OFF);
  232.   WaitForAction();
  233.  
  234.  
  235.   Clear();
  236.   Print(AppStrings[MSG_TEST4_TXT].as_Str);
  237.   SetGAL(GAL20V8);
  238.   EnableVcc();
  239.   WaitForAction();
  240.  
  241.  
  242.   Clear();
  243.   Print(AppStrings[MSG_TEST5_TXT].as_Str);
  244.   DisableVcc();
  245.   SetGAL(GAL16V8);
  246.   EnableVcc();
  247.   WaitForAction();
  248.  
  249.  
  250.   Clear();
  251.   Print(AppStrings[MSG_TEST6_TXT].as_Str);
  252.   InitGALer();
  253.   EnableOutput();
  254.   WriteByte(0xff, IC3);
  255.   WriteByte(0xff, IC4);
  256.   WriteByte(0xff, IC5);
  257.   WaitForAction();
  258.  
  259.  
  260.   Clear();
  261.   Print(AppStrings[MSG_TEST7_TXT].as_Str);
  262.   SetGAL(GAL20V8);
  263.   EnableVcc();
  264.   WriteByte(0x55, IC3);
  265.   WriteByte(0x55, IC4);
  266.   WriteByte(0x55, IC5);
  267.   WaitForAction();
  268.  
  269.  
  270.   Clear();
  271.   Print(AppStrings[MSG_TEST8_TXT].as_Str);
  272.   DisableVcc();
  273.   WriteByte(0xaa, IC3);
  274.   WriteByte(0xaa, IC4);
  275.   WriteByte(0xaa, IC5);
  276.   WaitForAction();
  277.  
  278.   DisableVcc();
  279.   InitGALer();
  280.   EnableOutput();
  281.   VeditOn();
  282.  
  283.  
  284.                         /* adjust edit voltages */
  285.   switch (hw_version) {
  286.   
  287.     case HW_GALER_1_2:
  288.     case HW_GALER_1_3:
  289.  
  290.       Clear();
  291.       Print(AppStrings[MSG_TEST9_TXT].as_Str);
  292.       SetVolt(0);
  293.       SetGAL(GAL20V8);
  294.       EnableVEdit();
  295.       WaitForAction();
  296.  
  297.       Clear();
  298.       Print(AppStrings[MSG_TEST10_TXT].as_Str);
  299.       SetVolt(1);
  300.       WaitForAction();
  301.  
  302.       Clear();
  303.       Print(AppStrings[MSG_TEST11_TXT].as_Str);
  304.       SetVolt(2);
  305.       WaitForAction();
  306.  
  307.       Clear();
  308.       Print(AppStrings[MSG_TEST12_TXT].as_Str);
  309.       SetVolt(3);
  310.       WaitForAction();
  311.  
  312.       Clear();
  313.       Print(AppStrings[MSG_TEST13_TXT].as_Str);
  314.       SetVolt(4);
  315.       WaitForAction();
  316.  
  317.       Print(AppStrings[MSG_TEST14_TXT].as_Str);
  318.       WaitForAction();
  319.  
  320.       Clear();
  321.       Print(AppStrings[MSG_TEST15_TXT].as_Str);
  322.       DisableVEdit();
  323.       SetGAL(GAL16V8);
  324.       EnableVEdit();
  325.       WaitForAction();
  326.  
  327.       break;
  328.  
  329.  
  330.     case HW_GALER_1_0:
  331.  
  332.       Clear();
  333.       Print(AppStrings[MSG_TEST22_TXT].as_Str);
  334.       SetVolt(0);
  335.       SetGAL(GAL20V8);
  336.       EnableVEdit();
  337.       WaitForAction();
  338.  
  339.       Clear();
  340.       Print(AppStrings[MSG_TEST23_TXT].as_Str);
  341.       DisableVEdit();
  342.       SetGAL(GAL16V8);
  343.       EnableVEdit();
  344.       WaitForAction();
  345.  
  346.       break;
  347.  
  348.   }
  349.  
  350.  
  351.                 /* check GALer's read functions */
  352.   Clear();
  353.  
  354.   if (hw_version >= HW_GALER_1_3)
  355.     Print(AppStrings[MSG_TEST16_TXT].as_Str);
  356.   else
  357.     Print(AppStrings[MSG_TEST25_TXT].as_Str);
  358.  
  359.   SetGAL(GAL20V8);
  360.   InitGALer();
  361.   EnableVcc();
  362.   EnableOutput();
  363.  
  364.   errorIC6a = errorIC6c = errorIC7 = 0;
  365.  
  366.                     /* test IC6a */
  367.   WriteByte(0x40, IC3);
  368.   if (!ReadByte(IC6a))
  369.     errorIC6a = 1;
  370.  
  371.   WriteByte(0x00, IC3);
  372.   if (ReadByte(IC6a))
  373.     errorIC6a = 1;
  374.  
  375.  
  376.                     /* test IC6c */
  377.   if (hw_version >= HW_GALER_1_3) {
  378.     WriteByte(0x80, IC3);
  379.     if (!ReadByte(IC6c))
  380.       errorIC6c = 1;
  381.  
  382.     WriteByte(0x00, IC3);
  383.     if (ReadByte(IC6c))
  384.       errorIC6c = 1;
  385.   }
  386.  
  387.  
  388.                     /* test IC7 */
  389.   WriteByte(0x00, IC5);
  390.   if (ReadByte(IC7))
  391.     errorIC7 = 1;
  392.  
  393.   WriteByte(0x2A, IC3);
  394.   WriteByte(0x20, IC5);
  395.   if (ReadByte(IC7) != 0xAA)
  396.     errorIC7 = 1;
  397.  
  398.   WriteByte(0x15, IC3);
  399.   WriteByte(0x10, IC5);
  400.   if (ReadByte(IC7) != 0x55)
  401.     errorIC7 = 1;
  402.  
  403.  
  404.  
  405.   DisableVcc();
  406.   DisableOutput(); 
  407.  
  408.  
  409.  
  410.  
  411.   if (errorIC6c || errorIC6a || errorIC7) {
  412.  
  413.     Print(AppStrings[MSG_TEST17_TXT].as_Str);
  414.  
  415.     if (errorIC6a) {
  416.       Print(AppStrings[MSG_TEST18_TXT].as_Str);
  417.     }
  418.  
  419.     if (errorIC7) {
  420.       Print(AppStrings[MSG_TEST19_TXT].as_Str);
  421.     }
  422.  
  423.     if  (errorIC6c) {
  424.       Print(AppStrings[MSG_TEST20_TXT].as_Str);
  425.     }
  426.  
  427.   }
  428.   else {
  429.     if (hw_version == HW_GALER_1_0)
  430.       Print(AppStrings[MSG_TEST24_TXT].as_Str);
  431.     else
  432.       Print(AppStrings[MSG_TEST21_TXT].as_Str);
  433.   }
  434.  
  435.  
  436.   CancelGad.GadgetText = &GadIText3;
  437.   OffGadget(&ContGad, window, NULL);
  438.   RefreshGList(&ContGad, window, NULL, -1);
  439.  
  440.   WaitForAction();
  441.  
  442.  
  443.   RestoreParPort();
  444.  
  445.   FreeTimer();
  446.  
  447.   closestuff();
  448. }
  449.  
  450.  
  451.  
  452.  
  453.  
  454. /* get timer
  455. */
  456. int GetTimer(void)
  457. {
  458.  
  459.  timeport = CreatePort(0L,0L);
  460.  if (timeport == NULL)
  461.    return(-1);
  462.  
  463.  timereq=(struct timerequest *)AllocMem(
  464.             (long)sizeof(struct timerequest),MEMF_PUBLIC);
  465.  if (timereq == NULL) {
  466.    DeletePort(timeport);
  467.    return(-1);
  468.   }
  469.  
  470.  timereq->tr_node.io_Message.mn_Node.ln_Type=NT_MESSAGE;
  471.  timereq->tr_node.io_Message.mn_Node.ln_Pri=0;
  472.  timereq->tr_node.io_Message.mn_ReplyPort=timeport;
  473.  
  474.  if (OpenDevice(TIMERNAME, UNIT_MICROHZ, (struct IORequest *)timereq, 0L)) {
  475.    FreeMem(&timereq, (long)sizeof(struct timerequest));
  476.    DeletePort (timeport);
  477.    return(-1);
  478.   }
  479.  
  480.  return(0);
  481. }
  482.  
  483.  
  484.  
  485.  
  486. /* free timer
  487. */
  488. void FreeTimer(void)
  489. {
  490.  CloseDevice((struct IORequest *)timereq);
  491.  
  492.  FreeMem(timereq, (long)sizeof(struct timerequest));
  493.  
  494.  DeletePort(timeport);
  495. }
  496.  
  497.  
  498.  
  499. /*micro: microsec. to wait
  500.   secs: seconds to wait
  501. */
  502. void WaitForTimer(ULONG micro)
  503. {
  504.  
  505.   timereq->tr_node.io_Command=TR_ADDREQUEST;
  506.   timereq->tr_time.tv_secs=0;
  507.   timereq->tr_time.tv_micro=micro;
  508.  
  509.   DoIO((struct IORequest *)timereq);
  510.  
  511. }
  512.  
  513.  
  514.  
  515.  
  516. /* clear window
  517. */
  518. void Clear(void)
  519. {
  520.  
  521.   ytxt = YPOS;
  522.  
  523.   SetAPen(rp, 0L);
  524.  
  525.   RectFill(rp, 10L, 22L, 630L, 170L);
  526.  
  527.   SetAPen(rp, 1L);
  528.  
  529. }
  530.  
  531.  
  532.  
  533.  
  534. /* print text
  535. */
  536. void Print(UBYTE *text)
  537. {
  538. UBYTE *ptr;
  539. int   notready;
  540.  
  541.  
  542.   ptr = text;
  543.  
  544.   notready = 1;
  545.  
  546.   while (notready) {
  547.                         /* search CR or end of */
  548.     while ((*ptr != 0x00) && (*ptr != 0x0A))    /* string              */
  549.       ptr++;
  550.  
  551.  
  552.     if (ytxt < 160)
  553.       ytxt += 10;
  554.     else
  555.       ScrollRaster(rp,0L,10L,10L,22L,630L,170L);
  556.  
  557.  
  558.     if (*text != 0x0A) {
  559.       Move(rp, 20L, (long)ytxt);        /* print string */
  560.       Text(rp, text, (long)(ptr - text));
  561.     }
  562.  
  563.     if (!*ptr)
  564.       notready = 0;
  565.  
  566.     text = ++ptr;
  567.  
  568.   }
  569.  
  570. }
  571.  
  572.  
  573.  
  574.  
  575.  
  576. /* wait until gadget is selected
  577. */
  578. void WaitForAction(void)
  579. {
  580. ULONG    class;
  581. USHORT    code,gadID;
  582.  
  583.  for(;;) {
  584.  
  585.    Wait(1L << window->UserPort->mp_SigBit);
  586.  
  587.    while (message = (struct IntuiMessage *)GetMsg(window->UserPort)) {
  588.  
  589.      class = message -> Class;
  590.      code  = message -> Code;
  591.  
  592.      if (class == GADGETUP)
  593.        gadID = ((struct Gadget *)message->IAddress)->GadgetID;
  594.  
  595.      ReplyMsg((struct Message *)message);
  596.  
  597.      switch(class) {
  598.  
  599.                         /* exit GALerTest */
  600.     case CLOSEWINDOW: DisableVcc();
  601.               DisableOutput(); 
  602.               LED(OFF);
  603.               closestuff();
  604.               FreeTimer();
  605.               RestoreParPort();
  606.               exit(0);
  607.               break;
  608.  
  609.     case GADGETUP:    if (!gadID)
  610.                 return;                
  611.               else {        /* cancel selected */
  612.                 DisableVcc();
  613.                 DisableOutput(); 
  614.                 LED(OFF);
  615.                 closestuff();
  616.                 FreeTimer();
  617.                 RestoreParPort();
  618.                 exit (0);
  619.               }
  620.               break;
  621.      }
  622.    }
  623.  }
  624. }
  625.  
  626.  
  627.  
  628.  
  629.  
  630. /* close window, libs...
  631. */
  632. void closestuff(void)
  633. {
  634.   if (window) CloseWindow(window);
  635.  
  636.   if (GfxBase) CloseLibrary((struct Library *)GfxBase);
  637.  
  638.   if (IntuitionBase) CloseLibrary((struct Library *)IntuitionBase);
  639.  
  640.   if (ReqToolsBase) CloseLibrary ((struct Library *)ReqToolsBase);
  641.  
  642.   if (LocaleBase) {
  643.     CloseCatalog(catalog);
  644.     CloseLibrary((struct Library *)LocaleBase);
  645.   }
  646.  
  647. }
  648.  
  649.  
  650.  
  651.  
  652. /* open window, libs...
  653. */
  654. void openstuff(void)
  655. {
  656. struct Screen  *WBscreen;
  657.  
  658.  
  659.   if (LocaleBase = (struct LocaleBase *)OpenLibrary("locale.library", 38L))
  660.     catalog = OpenCatalog(NULL, (STRPTR)"GALerTest.catalog", OC_Version, 1, TAG_DONE);
  661.  
  662.   LocalizeText();
  663.  
  664.  
  665.   if (!(IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", 37L))) {
  666.     puts (AppStrings[MSG_ERR_INTLIB].as_Str);
  667.     closestuff();
  668.     exit(FALSE);
  669.   }
  670.  
  671.   if (!(GfxBase = (struct GfxBase *)OpenLibrary("graphics.library", 37L))) {
  672.     puts (AppStrings[MSG_ERR_GRAPHLIB].as_Str);
  673.     closestuff();
  674.     exit(FALSE);
  675.   }
  676.  
  677.   if (!(ReqToolsBase = (struct ReqToolsBase *)OpenLibrary(REQTOOLSNAME, REQTOOLSVERSION))) {
  678.     puts((char *)AppStrings[MSG_ERR_REQTOOLSLIB].as_Str);
  679.     closestuff();
  680.     exit(FALSE);
  681.   }
  682.  
  683.  
  684.   txtattr.ta_Name  = (STRPTR)"topaz.font";        /* get font */
  685.   txtattr.ta_YSize = 8;
  686.   txtattr.ta_Style = 0;
  687.   txtattr.ta_Flags = 0;
  688.  
  689.   if (!(txtfont = (struct TextFont *)OpenFont(&txtattr))) {
  690.     puts(AppStrings[MSG_ERR_FONT].as_Str);
  691.     closestuff();
  692.     exit(FALSE);
  693.   }
  694.  
  695.                             /* center GALerTest's */
  696.                             /* window */
  697.   if (WBscreen = LockPubScreen((UBYTE *)"Workbench")) {
  698.  
  699.     if (WBscreen->Width > WIN_WIDTH)
  700.       MyWin.LeftEdge = (WBscreen->Width - WIN_WIDTH ) / 2;
  701.  
  702.     if (WBscreen->Height > WIN_HEIGHT)
  703.       MyWin.TopEdge  = (WBscreen->Height- WIN_HEIGHT) / 2;
  704.  
  705.     UnlockPubScreen(NULL, WBscreen);
  706.   }
  707.  
  708.   if (!(window = (struct Window *)OpenWindow(&MyWin))) {    /* open window */
  709.     puts (AppStrings[MSG_ERR_WIN].as_Str);
  710.     closestuff();
  711.     exit(FALSE);
  712.   }
  713. }
  714.  
  715.  
  716.  
  717.  
  718. /* localize text
  719. */
  720. void LocalizeText(void)
  721. {
  722.  
  723.   if (LocaleBase && catalog) {
  724.  
  725.     AppStrings[MSG_END_GAD].as_Str = GetCatalogStr(catalog, MSG_END_GAD, AppStrings[MSG_END_GAD].as_Str);
  726.     AppStrings[MSG_CANCEL_GAD].as_Str = GetCatalogStr(catalog, MSG_CANCEL_GAD, AppStrings[MSG_CANCEL_GAD].as_Str);
  727.     AppStrings[MSG_CONT_GAD].as_Str = GetCatalogStr(catalog, MSG_CONT_GAD, AppStrings[MSG_CONT_GAD].as_Str);
  728.     AppStrings[MSG_ERR_TIMER].as_Str = GetCatalogStr(catalog, MSG_ERR_TIMER, AppStrings[MSG_ERR_TIMER].as_Str);
  729.     AppStrings[MSG_ERR_INTLIB].as_Str = GetCatalogStr(catalog, MSG_ERR_INTLIB, AppStrings[MSG_ERR_INTLIB].as_Str);
  730.     AppStrings[MSG_ERR_FONT].as_Str = GetCatalogStr(catalog, MSG_ERR_FONT, AppStrings[MSG_ERR_FONT].as_Str);
  731.     AppStrings[MSG_ERR_GRAPHLIB].as_Str = GetCatalogStr(catalog, MSG_ERR_GRAPHLIB, AppStrings[MSG_ERR_GRAPHLIB].as_Str);
  732.     AppStrings[MSG_ERR_REQTOOLSLIB].as_Str = GetCatalogStr(catalog, MSG_ERR_REQTOOLSLIB, AppStrings[MSG_ERR_REQTOOLSLIB].as_Str);
  733.     AppStrings[MSG_ERR_WIN].as_Str = GetCatalogStr(catalog, MSG_ERR_WIN, AppStrings[MSG_ERR_WIN].as_Str);
  734.     AppStrings[MSG_HARDWARE_TXT].as_Str = GetCatalogStr(catalog, MSG_HARDWARE_TXT, AppStrings[MSG_HARDWARE_TXT].as_Str);
  735.     AppStrings[MSG_INTRO_TXT].as_Str = GetCatalogStr(catalog, MSG_INTRO_TXT, AppStrings[MSG_INTRO_TXT].as_Str);
  736.     AppStrings[MSG_TEST1_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST1_TXT, AppStrings[MSG_TEST1_TXT].as_Str);
  737.     AppStrings[MSG_TEST2_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST2_TXT, AppStrings[MSG_TEST2_TXT].as_Str);
  738.     AppStrings[MSG_TEST3_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST3_TXT, AppStrings[MSG_TEST3_TXT].as_Str);
  739.     AppStrings[MSG_TEST4_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST4_TXT, AppStrings[MSG_TEST4_TXT].as_Str);
  740.     AppStrings[MSG_TEST5_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST5_TXT, AppStrings[MSG_TEST5_TXT].as_Str);
  741.     AppStrings[MSG_TEST6_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST6_TXT, AppStrings[MSG_TEST6_TXT].as_Str);
  742.     AppStrings[MSG_TEST7_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST7_TXT, AppStrings[MSG_TEST7_TXT].as_Str);
  743.     AppStrings[MSG_TEST8_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST8_TXT, AppStrings[MSG_TEST8_TXT].as_Str);
  744.     AppStrings[MSG_TEST9_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST9_TXT, AppStrings[MSG_TEST9_TXT].as_Str);
  745.     AppStrings[MSG_TEST10_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST10_TXT, AppStrings[MSG_TEST10_TXT].as_Str);
  746.     AppStrings[MSG_TEST11_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST11_TXT, AppStrings[MSG_TEST11_TXT].as_Str);
  747.     AppStrings[MSG_TEST12_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST12_TXT, AppStrings[MSG_TEST12_TXT].as_Str);
  748.     AppStrings[MSG_TEST13_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST13_TXT, AppStrings[MSG_TEST13_TXT].as_Str);
  749.     AppStrings[MSG_TEST14_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST14_TXT, AppStrings[MSG_TEST14_TXT].as_Str);
  750.     AppStrings[MSG_TEST15_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST15_TXT, AppStrings[MSG_TEST15_TXT].as_Str);
  751.     AppStrings[MSG_TEST16_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST16_TXT, AppStrings[MSG_TEST16_TXT].as_Str);
  752.     AppStrings[MSG_TEST17_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST17_TXT, AppStrings[MSG_TEST17_TXT].as_Str);
  753.     AppStrings[MSG_TEST18_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST18_TXT, AppStrings[MSG_TEST18_TXT].as_Str);
  754.     AppStrings[MSG_TEST19_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST19_TXT, AppStrings[MSG_TEST19_TXT].as_Str);
  755.     AppStrings[MSG_TEST20_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST20_TXT, AppStrings[MSG_TEST20_TXT].as_Str);
  756.     AppStrings[MSG_TEST21_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST21_TXT, AppStrings[MSG_TEST21_TXT].as_Str);
  757.     AppStrings[MSG_TEST22_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST22_TXT, AppStrings[MSG_TEST22_TXT].as_Str);
  758.     AppStrings[MSG_TEST23_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST23_TXT, AppStrings[MSG_TEST23_TXT].as_Str);
  759.     AppStrings[MSG_TEST24_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST24_TXT, AppStrings[MSG_TEST24_TXT].as_Str);
  760.     AppStrings[MSG_TEST25_TXT].as_Str = GetCatalogStr(catalog, MSG_TEST25_TXT, AppStrings[MSG_TEST25_TXT].as_Str);
  761.  
  762.   }
  763.  
  764.  
  765.                 /* localize gadgets */
  766.  
  767.   GadIText3.IText = AppStrings[MSG_END_GAD].as_Str;
  768.  
  769.   GadIText2.IText = AppStrings[MSG_CANCEL_GAD].as_Str;
  770.  
  771.   GadIText1.IText = AppStrings[MSG_CONT_GAD].as_Str;
  772.  
  773.  
  774. }
  775.  
  776.  
  777.